package com.attendance.mapper;

import com.attendance.entity.*;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface TeamMapper {

    void insert(Team team);

    Integer selectUserIdByEmail(String email);

    List<Team> selectTeamByUserID(Integer id);

    Team selectTeamOneByUserId(Integer id);

    List<Team> selectTeamByUserIDLeave(Integer id);

    List<Cpxm> selectCPXM();

    List<Cpxh> selectCPXH();

    List<CpDTO> selectByGroup(Integer cpxm_id);

    int insertCpxm(Cpxm cpxm);

    int insertCpxh(Cpxh cpxh);

    int insertCp(CpxmCpxh cp);

    Cpxh selectByKeyAndLabel(Cpxh cpxh);

    List<TeamMemberDTO> selectTeamMemberById(Integer team_id);

    int updateCpxh(Cpxh cpxh);

    int updateCpxm(Cpxm cpxm);

    int deleteCpxh(Integer id);

    int deleteCpxmCpxh(Integer id);

    int deleteCpxm(Integer id);

    int deleteCpxhCpxm(Integer id);

    int updateUserName(TeamMemberDTO teamMemberDTO);

    int deleteTeamUser(Integer id);

    List<User> searchUser(String email);

    Team selectByTeamId(Integer team_id);

    int addTeamUser(TeamUser teamUser);

    History selectHistoryByFileName(String name);

    int insertHistory(History history);

    List<History> selectHistoryByTeamId(Integer id);

    List<Team> searchTeam(String team_name);

    List<Team> selectJoinTeam(Integer uid);

    TeamUser selectTeamUser(Integer uid);

    void insertTeamUser(TeamUser teamUser);

    List<TeamUserListDTO> selectUserListByTeam(Integer tId);

    int updateTutByIdRID(TutDTO tutDTO);

}
